package com.topscore.uke.ui.activities;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import com.topscore.uke.R;
import com.topscore.uke.ui.ToolBarCompatActivity;

import butterknife.Bind;
import butterknife.ButterKnife;

public class MyTeamActivity extends ToolBarCompatActivity implements View.OnClickListener {

    @Bind(R.id.group_member)
    RelativeLayout groupMember;
    @Bind(R.id.team_performance)
    RelativeLayout teamPerformance;
    @Bind(R.id.invite_register)
    RelativeLayout inviteRegister;
    @Bind(R.id.audit_register)
    RelativeLayout auditRegister;
    @Bind(R.id.team_setting)
    RelativeLayout teamSetting;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_team);
        ButterKnife.bind(this);
        setCentralTitle("我的团队");
        initViews();
    }

    private void initViews() {
        groupMember.setOnClickListener(this);
        teamPerformance.setOnClickListener(this);
        inviteRegister.setOnClickListener(this);
        auditRegister.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.team_performance:
                toTeamPerformance();
                break;
            case R.id.group_member:
                toGroupMember();
                break;
            case R.id.invite_register:
                toInviteRegister();
                break;
            case R.id.audit_register:
                toAudit();
                break;
            case R.id.team_setting:
                toSetting();
                break;
        }
    }

    private void toSetting() {
        Intent intent = new Intent(mContext,TeamSettingActivity.class);
        startActivity(intent);
    }

    private void toGroupMember() {
//        Intent intent = new Intent(mContext, TeamStaffListActivity.class);
        Intent intent = new Intent(mContext,MyTeamStaffListActivity.class);
        startActivity(intent);
    }

    private void toTeamPerformance() {
        Intent intent = new Intent(this, TeamPerformanceActivity.class);
        startActivity(intent);
    }

    private void toInviteRegister() {
        Intent intent = new Intent(mContext, InviteToRegisterActivity.class);
        startActivity(intent);
    }

    private void toAudit() {
        Intent intent = new Intent(this, AuditActivity.class);
        startActivity(intent);
    }
}
